// WindowSize.java
// Jeremy Singer
// 9 Sep 11

/*
 * Constant WindowSize - parameter to PID control equation.
 * We run an iteration of the PID controller every time the
 * number of bytes allocated crosses the window size
 * threshold
 */

package org.mmtk.utility.options;

public final class WindowSize extends org.vmutil.options.IntOption {

  /**
   * Create the option.
   */
  public WindowSize() {
    super(Options.set, "WindowSize",
          "Value (in bytes) of the windowSize parameter for the PID controller for heap resizing",
          1<<20);  // default to 1MB
  }

  /**
   * Only accept positive values
   */
  protected void validate() {
    failIf(this.value <= 0, "Must be positive");
  }
}
